package java6699.lesson14;

import java.io.*;
import java.net.Socket;

/**
 * @program: java_zzx
 * @description:
 * @author: zzx
 * @create: 2022-12-07 18:23
 **/
public class BaseClient6699 {
    public static void main(String[] args) throws IOException {
        System.out.println("客户拨号......");
        Socket socket = new Socket("192.168.11.188", 8086);
        PrintStream printer = new PrintStream(socket.getOutputStream());
        printer.println("212106699周梓希：第一次鸦片战争养了谁？");

        BufferedReader reader = new BufferedReader(
                new InputStreamReader(socket.getInputStream()));
        String s = reader.readLine();
        System.out.println(s);
        socket.close();
    }
}
